package com.sdcs.server.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sdcs.server.daoimpl.TeacherDaoImpl;
import com.sdcs.server.model.Teacher;

@Service
public class TeacherService {
	@Autowired
	private TeacherDaoImpl teacherDaoImpl;
	
	public Teacher login(String name, String password) {
		return teacherDaoImpl.login(name, password);
	}
	
	public Teacher getById(String id) {
		return teacherDaoImpl.getById(id);
	}

	public void update(Teacher object) {
		teacherDaoImpl.update(object);
	}

	public List<Teacher> getAll(int pageIndex, int pageSize) {
		return teacherDaoImpl.getAll(pageIndex, pageSize);
	}

	public int getTotalCount() {
		return teacherDaoImpl.getTotalCount();
	}

	public void save(Teacher object) {
		teacherDaoImpl.save(object);
	}

	public void delete(String id) {
		teacherDaoImpl.delete(id);
	}
	
}
